<template>
    <!-- 轮播部分 -->
    <div class="app-body">
        <!-- <mt-swipe :auto="4000">
            <mt-swipe-item v-for="item in lunboList" :key="item.id">
                <img :src="item.img" alt="">
            </mt-swipe-item>
        </mt-swipe> -->
        <swiper :lunboList="lunboList" :isFull="true"></swiper>
        <!-- 列表 -->
        <ul class="mui-table-view mui-grid-view mui-grid-9">
            <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
                <router-link to="/home/newList">
                    <img src="../../images/menu1.png" alt="">
                    <div class="mui-media-body">新闻资讯</div>
                </router-link>
            </li>
            <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
                <router-link to="/home/photolist">
                    <img src="../../images/menu2.png" alt="">
                    <div class="mui-media-body">图片分享</div>
                </router-link>
            </li>
            <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
                <router-link to="home/goodslist">
                    <img src="../../images/menu3.png" alt="">
                    <div class="mui-media-body">商品购买</div>
                </router-link>
            </li>
            <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
                <router-link to="/home/commentlist/37">
                    <img src="../../images/menu4.png" alt="">
                    <div class="mui-media-body">留言反馈</div>
                </router-link>
            </li>
            <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
                <router-link to="home/videolist">
                    <img src="../../images/menu5.png" alt="">
                    <div class="mui-media-body">电影资讯</div>
                </router-link>
            </li>
            <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
                <a href="#">
                    <img src="../../images/menu6.png" alt="">
                    <div class="mui-media-body">联系我们</div>
                </a>
            </li>
        </ul>
    </div>

</template>

<script>
// 加载弹出信息组件
import { Toast } from "mint-ui";
import swiper from '../common/swiper.vue'

export default {
  data() {
    return {
      lunboList: []//保留轮播图的数组
    };
  },
  created() {
    this.getLunbo();
  },
  methods: {
    getLunbo() {
      this.$http.get("api/getlunbo").then(res => {
        if (res.body.status === 0) {
        //   Toast("轮播图信息加载成功");
          this.lunboList = res.body.message;
        } else {
          Toast("轮播图信息加载失败");
        }
      });
    }
  },
  components:{
      swiper
  }
};
</script>

<style scoped lang="scss">
// 六宫格
.mui-table-view {
    border: 0;
    background-color: azure;
    .mui-table-view-cell {
        border:0;
        img {
            width:60px;
            height: 60px;
        }
    }
}

</style>
